<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateTopicsTable extends Migration {
	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up() {
		Schema::create('topics', function (Blueprint $table) {
			$table->increments('id');
			$table->integer('user_id')->comment('用户ID');
			$table->integer('column_id')->comment('栏目ID');
			$table->string('pic')->comment('话题图片');
			$table->string('title')->comment('话题名称');
			$table->text('desc')->comment('话题描述');
			$table->string('status')->comment('话题状态: 1 正常; 0 过期');
			$table->timestamps();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down() {
		Schema::drop('topics');
	}
}
